import service from "@/utils/request";
import { historyquery } from "./model";
import { historyadd } from "./model";
const DEPT_BASE_URL = "/api/";

//显示种母历史记录数据表
class history{
static getList(queryParams?: historyquery) {
    return service<any, historyquery>({
      url: `${DEPT_BASE_URL}History/GetHistoryList`,
      method: "get",
      params: queryParams,
    });
}
  // //添加种母历史记录表
  static addHistory(data?:any[]) { return service({ url: `${DEPT_BASE_URL}History/AddHistoryrecord`, method: "post", data }); }
  // //删除种母历史记录表
  static deleteHirstory(id: number) { return service({ url: `${DEPT_BASE_URL}History/DeleteHistoryrecord`, method: "delete", data: { hrId: id } }); }
  // //批量删除
   static deleteBatchHirstory(ids: number[]) { return service({ url: `${DEPT_BASE_URL}History/DeleteRangeHistoryrecord`, method: "put", data: { hrIds: ids } }); }
  //反填种母历史记录表
  static getByIdHistory(earTag:string) { return service({ url: `${DEPT_BASE_URL}History/GetHistoryById`, method: "get", params: { earTag: earTag } }); }
  
  
  // //修改种母历史记录表
  static updateHistory(startdata?: historyadd) { return service({ url: `${DEPT_BASE_URL}History/UpdateHisRecord`, method: "put", data: startdata }); }
  


  
}
export default history;
